package cn.ckx.coding.common.exception;


/**
 * 公共异常列表
 * @author kunxin.cai
 */
public interface CommonErrors {

    /**
     * 500
     * 系统繁忙 
     */
    BusinessError UNEXPECT_ERROR = BusinessError.builder(ErrorCodes.UNEXPECT_ERROR, "系统繁忙，请稍后再试");

    BusinessError CODE_ERROR = BusinessError.builder(ErrorCodes.UNEXPECT_ERROR, "代码引用错误，请求路径：%s，方法：%s，错误原因：%s");


    /**
     * 400
     * 缺少参数
     */
    BusinessError PARAMETER_ERROR = BusinessError.builder(ErrorCodes.BAD_REQUEST, "参数错误：%s");

    BusinessError PARAMETER_MISS_ERROR = BusinessError.builder(ErrorCodes.PARAMETER_MISS, "缺少参数：%s");

    BusinessError PARAMETER_EXIST_ERROR = BusinessError.builder(ErrorCodes.PARAMETER_MISS, "缺少参数：%s");

    BusinessError DATA_NOT_EXIST = BusinessError.builder(ErrorCodes.REQUEST_NOT_FIND, "查找数据不存在");

    BusinessError ARGUMENT_NOT_VALID = BusinessError.builder(ErrorCodes.BAD_REQUEST, "%s");

    BusinessError REMOTE_SERVICE_ERROR = BusinessError.builder(ErrorCodes.REMOTE_SERVICE_ERROR, "%s");

}
